package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DefGainReviewMapper;
import com.ruoyi.system.domain.DefGainReview;
import com.ruoyi.system.service.IDefGainReviewService;

/**
 * 成果评审记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-11
 */
@Service
public class DefGainReviewServiceImpl implements IDefGainReviewService 
{
    @Autowired
    private DefGainReviewMapper defGainReviewMapper;

    /**
     * 查询成果评审记录
     * 
     * @param id 成果评审记录主键
     * @return 成果评审记录
     */
    @Override
    public DefGainReview selectDefGainReviewById(Long id)
    {
        return defGainReviewMapper.selectDefGainReviewById(id);
    }

    /**
     * 查询成果评审记录列表
     * 
     * @param defGainReview 成果评审记录
     * @return 成果评审记录
     */
    @Override
    public List<DefGainReview> selectDefGainReviewList(DefGainReview defGainReview)
    {
        return defGainReviewMapper.selectDefGainReviewList(defGainReview);
    }

    /**
     * 新增成果评审记录
     * 
     * @param defGainReview 成果评审记录
     * @return 结果
     */
    @Override
    public int insertDefGainReview(DefGainReview defGainReview)
    {
        defGainReview.setCreateTime(DateUtils.getNowDate());
        return defGainReviewMapper.insertDefGainReview(defGainReview);
    }

    /**
     * 修改成果评审记录
     * 
     * @param defGainReview 成果评审记录
     * @return 结果
     */
    @Override
    public int updateDefGainReview(DefGainReview defGainReview)
    {
        return defGainReviewMapper.updateDefGainReview(defGainReview);
    }

    /**
     * 批量删除成果评审记录
     * 
     * @param ids 需要删除的成果评审记录主键
     * @return 结果
     */
    @Override
    public int deleteDefGainReviewByIds(Long[] ids)
    {
        return defGainReviewMapper.deleteDefGainReviewByIds(ids);
    }

    /**
     * 删除成果评审记录信息
     * 
     * @param id 成果评审记录主键
     * @return 结果
     */
    @Override
    public int deleteDefGainReviewById(Long id)
    {
        return defGainReviewMapper.deleteDefGainReviewById(id);
    }
}
